"""
 Flash OS Routines (Automagically Generated)
 Copyright (c) 2017-2017 ARM Limited
"""

flash_algo = {
    'load_address' : 0x20000000,
    'instructions' : [
        0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
        0x4770BA40, 0x4770BAC0, 0x4D6DB570, 0x06006828, 0x486C0F44, 0x68E98900, 0x0D400540, 0x02C90AC9,
        0x60E94301, 0xD0262C00, 0xF8BCF000, 0x21016828, 0x60284308, 0x050068E8, 0xF000D5FC, 0x6828F8B3,
        0x438821E0, 0xF0006028, 0x2C01F8AD, 0x2C02D006, 0x2C03D007, 0x2C04D008, 0xE008D10D, 0x21026828,
        0x6828E007, 0xE0042104, 0x21086828, 0x6828E001, 0x43882110, 0xF0006028, 0x6828F895, 0x02092107,
        0x60284388, 0xF88EF000, 0x21036828, 0x438802C9, 0xF0006028, 0x4C4CF879, 0x60202020, 0xF874F000,
        0x60602017, 0xF870F000, 0x60A0201B, 0xF86CF000, 0x60E04846, 0xF868F000, 0x61204845, 0xF864F000,
        0x61602018, 0xF860F000, 0x61A020F0, 0xF85CF000, 0x00C0207D, 0x200061E0, 0x2000BD70, 0xB5704770,
        0x6A204C39, 0xD4FC06C0, 0xF84EF000, 0x43C02000, 0xF0006320, 0x6A20F849, 0x43082103, 0x25006220,
        0x6A20602D, 0xD4FC06C0, 0xF83EF000, 0x20006325, 0xB570BD70, 0x46054C2C, 0x06C86A21, 0xF000D4FC,
        0x2000F833, 0x632043C0, 0xF82EF000, 0x08806A20, 0x1C800080, 0x26006220, 0x6A20602E, 0xD4FC06C0,
        0xF822F000, 0x20006326, 0xB5F7BD70, 0x460F4616, 0xF0002400, 0x4D1CF819, 0x63281E60, 0xF814F000,
        0x08806A28, 0x1C400080, 0xE0066228, 0x5D319800, 0x6A285501, 0xD4FC06C0, 0x42BC1C64, 0xF000D3F6,
        0x2000F803, 0xBDFE6328, 0x6AC1480F, 0x0C094A11, 0x18890409, 0x6AC162C1, 0x0C094A0F, 0x18890409,
        0x477062C1, 0x68814806, 0x0C094A0A, 0x18890409, 0x68816081, 0x0C094A08, 0x18890409, 0x47706081,
        0x40002000, 0x00100C00, 0x40020000, 0x00004650, 0x000222E0, 0x00005A5A, 0x0000A5A5, 0x00000000
    ],

    'pc_Init'            : 0x20000029,
    'pc_UnInit'          : 0x200000FB,
    'pc_EraseSector'     : 0x20000133,
    'pc_ProgramPage'     : 0x2000016B,
    'pc_Verify'          : 0x12000001F,
    'pc_EraseChip'       : 0x200000FF,
    'pc_BlankCheck'      : 0x12000001F,
    'pc_Read'            : 0x12000001F,
    
    'static_base'        : 0x20000400,
    'begin_data'         : 0x20000800,
    'begin_stack'        : 0x20000C00,

    'analyzer_supported' : False,

    # Relative region addresses and sizes
    'ro_start'           : 0x00000000,
    'ro_size'            : 0x000001DC,
    'rw_start'           : 0x000001DC,
    'rw_size'            : 0x00000004,
    'zi_start'           : 0x000001E0,
    'zi_size'            : 0x00000000,

    # Flash information
    'flash_start'        : 0x00000000,
    'flash_size'         : 0x00010000,
    'flash_page_size'    : 0x00000200,
}
